import express from 'express';
import {
    addOrder,
    // deleteOrder,
    getOrderById,
    getOrders,
    getOrdersByUserIdAndStatus,
    countOrdersByStatusForUser,
    updateOrderStatus,
    generateOrders,
    afterPay,
    weixinNotify
    // payOrderForProduct,

} from '../controllers/OrderController';
import payOrderForBlindBox from '../controllers/order/payForBlindBox'
import payOrderForProduct from '../controllers/order/payForProduct'

const router = express.Router();

router.post('/', addOrder);
// router.delete('/:id', deleteOrder);
router.get('/:id', getOrderById);
router.post('/page', getOrders);
router.post('/queryByUserId', getOrdersByUserIdAndStatus);
router.post('/countAllOrder', countOrdersByStatusForUser);
router.post('/updateOrderStatus', updateOrderStatus);
router.post('/generateOrders', generateOrders);
router.post('/afterPay', afterPay);
router.all('/notify_wx_product', weixinNotify);
router.post('/pay/product', payOrderForProduct);
router.post('/pay/blind-box', payOrderForBlindBox);

export default router;
